var app = getApp();

Page({
  data: {
    currentIndex: 0,
    loadingBoo: !0,
    moreBoo: !0,
    prenumber: 10,
    detailFlag: !1,
    page: 0,
    integral: 0,
    type: 0
  },
  onLoad: function(t) {
    var that = this

  },
  onReady: function() {
  
  },
  onShow: function() {
    var that = this
    var type = that.data.type
    this.setData({
      moreBoo: !0
    }), this.getIntegral(type);
  },
  onHide: function() {},
  onUnload: function() {},
  sort: function(t) {
    var type = t.currentTarget.dataset.current

    this.setData({
      currentIndex: t.target.dataset.current,
      detailFlag: !1,
      moreBoo: !0,
      page: 0
    }), this.getIntegral(type)
  },
  getIntegral: function(type) {
    var that = this
    var openid = wx.getStorageSync('openid')
    app.util.request({
      'url': 'entry/wxapp/Patientsing',
      'data': {
        op: 'myjifen',
        openid: openid,
        type: type
      },
      success: function(res) {
        console.log(res)
        var shuju2 = res.data.getall
        that.setData({
          integralList: shuju2,
          integral: res.data.sum.credit
        })
      }
    })
  },


});